﻿<div ng-controller="memberGradeController">
    <div class="wrapper border-bottom white-bg page-heading">
        <div class="col-lg-pull-12">
            <ol class="breadcrumb">
                <li><a ui-sref="app.member.grade">会员等级</a></li>
                <li class="active" ng-bind="breadcrumb"></li>
            </ol>
        </div>
    </div>
    <form name="_form" class="form-horizontal w5c-form" w5c-form-validate="model.validateOptions" role="form" novalidate>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">名称</label>
            <div class="col-sm-3">
                <input type="text" name="grade_name" class="form-control " ng-model="model.grade_name" required>
            </div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">自动升级</label>
            <div class="col-sm-10">
                <div class="checkbox">
                    <label>
                        <input type="checkbox" name="is_upgrade" ng-model="model.is_upgrade" required>
                    </label>
                </div>
            </div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">状态</label>
            <div class="col-sm-10">
                <div class="checkbox">
                    <label>
                        <input type="checkbox" name="is_use" ng-model="model.is_use" required> 启用
                    </label>
                </div>
            </div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">升级金额</label>
            <div class="col-sm-3">
                <input type="number" name="upgrade_amount" class="form-control input-sm" ng-model="model.upgrade_amount" required>
            </div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">最高提成</label>
            <div class="col-sm-3">
                <input type="number" name="more_amount" class="form-control input-sm" ng-model="model.more_amount" required>
            </div>
            <div class="col-sm-7 form-control-static">
                如下：
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <div class="alert alert-info" role="alert">最高提成金额:90,180,270
                    <p>当前没有等级可以升级到1，2，3=》90，180，270</p>
                    <p>当前等级是1可以升级到2，3=》180,450(180+270)</p>
                    <p>当前等级是2可以升级到3=》270</p>
                </div>
            </div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">会员提成/折扣</label>
            <div class="col-sm-3">
                <input type="number" name="member_deduct" class="form-control input-sm" ng-model="model.member_deduct" required>
            </div>
            <div class="col-sm-7 form-control-static">会员自己买是{{model.member_deduct*10}}折，会员分销则以此比例分配三级佣金</div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label"></label>
            <div class="col-sm-3">
                <button type="submit" w5c-form-submit="save()" class="btn btn-primary btn-sm" btn-loading="psdisabled" loading-text="保存中..." ng-disabled="psdisabled">
                    <i class="fa fa-save"></i> 保存
                </button>
                <button ng-click="goBack()" class="btn btn-primary btn-sm"><i class="fa fa-rotate-left"></i> 取消</button>
            </div>
        </div>
    </form>
</div>
